Hack around problem whereby VMX domains (using the ioemu device) now fail
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Mon, 7 Nov 2005 11:35:06 +0000 (12:35 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Mon, 7 Nov 2005 11:35:06 +0000 (12:35 +0100)
because the new hotplug script error checking kicks in.

ioemu really ought to move out of blkif.py.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xend/server/DevController.py
tools/python/xen/xend/server/blkif.py

index 83363f9281e6218c76ab2cbb3411881b19c8de95..eed63ebbf93f25007180ae80b78f5a6d83a08c2f 100644 (file)
@@ -57,6 +57,8 @@ class DevController:
         @return The ID for the newly created device.
         """
         (devid, back, front) = self.getDeviceDetails(config)
+        if devid is None:
+            return 0
 
         self.writeDetails(config, devid, back, front)
 
index d60607f0f48a039886f08f0911bc3e4fc82852f8..b3b1247e6c4879bff987ff9d94003740bc82bb4c 100644 (file)
@@ -43,7 +43,7 @@ class BlkifController(DevController):
         
         dev = sxp.child_value(config, 'dev')
         if re.match('^ioemu:', dev):
-            return (0,{},{})
+            return (None,{},{})
 
         devid = blkif.blkdev_name_to_number(dev)